sudo wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo sh -c 'echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" > /etc/apt/sources.list.d/elastic-5.x.list'

sudo apt update
sudo apt install elasticsearch

sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service

